package ejb;

import java.util.List;
import javax.ejb.Local;

/**
 * Local interface for FaqFacade.
 * 
 * @author MyEclipse Persistence Tools
 */
@Local
public interface FaqFacadeLocal {
	/**
	 * Perform an initial save of a previously unsaved Faq entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method.
	 * 
	 * @param entity
	 *            Faq entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(Faq entity);

	/**
	 * Delete a persistent Faq entity.
	 * 
	 * @param entity
	 *            Faq entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(Faq entity);

	/**
	 * Persist a previously saved Faq entity and return it or a copy of it to
	 * the sender. A copy of the Faq entity parameter is returned when the JPA
	 * persistence mechanism has not previously been tracking the updated
	 * entity.
	 * 
	 * @param entity
	 *            Faq entity to update
	 * @return Faq the persisted Faq entity instance, may not be the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public Faq update(Faq entity);

	public Faq findById(Integer id);

	/**
	 * Find all Faq entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the Faq property to query
	 * @param value
	 *            the property value to match
	 * @return List<Faq> found by query
	 */
	public List<Faq> findByProperty(String propertyName, Object value);

	public List<Faq> findByPergunta(Object pergunta);

	public List<Faq> findByResposta(Object resposta);

	public List<Faq> findByPalavrasChaves(Object palavrasChaves);

	/**
	 * Find all Faq entities.
	 * 
	 * @return List<Faq> all Faq entities
	 */
	public List<Faq> findAll();
}